package pwd.allen.construct.composite.two;

/**
 * @author 门那粒沙
 * @create 2021-05-22 14:45
 **/
public class Leaf implements IComponent {
    private String name;
    public Leaf(String name) {
        this.name = name;
    }
    @Override
    public void operation() {
        System.out.println("树叶" + name + "：被访问！");
    }
}
